<?php
class CustInfoModel {
    public function getSingleCustBusiInfo($custID) {
        // 模拟根据给定的 $custID 执行实际查询并返回数据
        return "CustInfo for ID: {$custID}";
    }
}

function generatorFunction($custIDs) {
    $CustInfoModel = new CustInfoModel();
    foreach ($custIDs as $custID) {
        echo "yield start\n";
        $ret = (yield $CustInfoModel->getSingleCustBusiInfo($custID));
    }
}

$customerIds = [1, 2, 3];
$generator = generatorFunction($customerIds);
echo "generatorFunction end\n";

foreach ($generator as $customerInfo) {
    echo $customerInfo . PHP_EOL;
}
?>